#ifndef DEVICES_H
#define DEVICES_H
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/fs.h>
#include "rules.h"
#include "log.h"
#include "log.c"
#include "conn_tab.h"
#include "conn_tab.c"

#define FW_ATTR_MODE 0666 // permission mode for device files

static int r_init(void);
static void r_cleanup(void);

static ssize_t config_store(struct device *dev, struct device_attribute *attr,const char *buf, size_t count);
static ssize_t config_show(struct device *dev, struct device_attribute *attr,const char *buf, size_t count);
static int rules_open(struct inode *inode,struct file *filep);
static int rules_mmap(struct file *filp, struct vm_area_struct *vma);
static ssize_t rules_size_show(struct device *dev, struct device_attribute *attr,const char *buf);

static int log_open(struct inode *inode,struct file *filep);
static int log_mmap(struct file *filp, struct vm_area_struct *vma);
static ssize_t log_size_show(struct device *dev, struct device_attribute *attr,const char *buf);
static ssize_t log_clear_store(struct device *dev, struct device_attribute *attr,const char *buf);

static int conn_open(struct inode *inode,struct file *filep);
static int conn_mmap(struct file *filp, struct vm_area_struct *vma);
static ssize_t conn_size_show(struct device *dev, struct device_attribute *attr,const char *buf);
static ssize_t conn_clear_store(struct device *dev, struct device_attribute *attr,const char *buf);

#endif


